草庐IT

IOS App 提交 Export Compliance : Firebase

全部标签

curl - Beego 如何访问使用 multipart/form-data header 提交的参数?

我遇到了如下问题:当我向我的beego应用程序发出curl请求时curlhttp://localhost:8080/controller/path-XPOST-H'Content-Type:multipart/form-data;charset=UTF-8'-F“file=@file.csv;filename=file.csv”-F“name=first”我想从我的Controller访问name参数,但是当我尝试时func(c*Controller)Path(){...varnamestringc.Ctx.Input.Bind(&name,"name")//orI'vetried'n

google-app-engine - 从 AppEngine 使用 Firebase Admin SDK for Go

在编写想要验证firebaseidtoken(jwt)的AppEngine/Go后端时,我在AppEngine上运行时遇到了这个问题:http.DefaultTransportandhttp.DefaultClientarenotavailableinAppEngine.Seehttps://cloud.google.com/appengine/docs/go/urlfetch/此处描述了AdminSDK:https://firebase.google.com/docs/admin/setup只有当client.ks是一个导出的属性并且因此可以使用lib从应用程序写入时,以下内容可能会

firebase - 在 golang 应用程序中初始化 firebase 时出错

我正在使用firebasegosdk(https://github.com/acoshift/go-firebase-admin)并按照文档设置我的应用程序。但是当我尝试使用firebase.NewApp初始化应用程序时,我收到一条错误消息google:couldnotfinddefaultcredentials.谁能帮忙这是代码片段opt=option.WithCredentialsFile(viper.GetString("firebase"))app,err=firebase.NewApp(context.Background(),nil,opt)iferr!=nil{log.F

firebase - FCM Go Admin SDK 提供 MismatchSenderId

我有一个包含两个组件的应用程序:一个使用FCMGoAdmingSDK发送推送通知的服务器;以及使用FCM网络SDK接收生成注册token和接收推送通知的网络客户端。但是,当我尝试从服务器端发送消息时;尽管这两个SDK都在同一个Firebase项目中注册,但它给了我以下错误:httperrorstatus:403;reason:senderiddoesnotmatchregisrationtoken;code:mismatched-credential服务器组件详细信息我将FirebaseAdminSDK添加到我的服务器并使用服务帐户凭据对其进行了初始化。serviceAccountKe

postgresql - 在 Golang 中使用 postgres 获取事务提交前的最后一个 ID

我有2个insert查询。在第二个insert查询中,我需要第一个insert返回id。我将这些查询作为事务处理,因为它们相互依赖。那么,是否有可能在Golang的postgres中提交事务之前获取最后插入的id。 最佳答案 Postgres支持returning关键字来选择插入的id:INSERTINTOYourTable(col1,col2)VALUES('Value1','Value2')RETURNINGid; 关于postgresql-在Golang中使用postgres获取事

firebase - 如何返回文档索引名称值

这是一个GoLang、FirebaseAdminSDK问题。此示例用于遍历FireStore数据库中的所有文档。如何获取文档名称?换句话说:如果集合名称是JohnyCollection,并且JohnyCollection有20个文档调用(Document1,Document2....Document20),如何在golang代码中获取文档名称?//========================================packagemainimport("context""fmt""log""firebase.google.com/go""google.golang.org/a

firebase - Golang、Firebase...将 MAP 转换为结构 slice

如何将DocumentmapSnapshot从firestore转换为structslice?此示例中未显示该结构,但问题代码位于页面末尾。除底部的标记代码外,此代码有效。代码与FireStore数据库通信并返回一个名为COMPLEX_NONACS的复杂结构。基本上,我想转换.将快照存储到jsongolang对象中。packagemainimport("context""fmt""log""firebase.google.com/go""google.golang.org/api/iterator""google.golang.org/api/option")funccheck(eer

firebase - 如何从 firebase 获取多条记录?

我有一个firebase数据库,其中包含如下数据:我想根据特定条件提取多条记录。我已经想出如何使用以下方法基于ID提取单个记录:ref:=fbDB.NewRef("/Event/123")event:=data.EventData{}iferr:=ref.Get(c,&event);err!=nil{//errorhandlingstuff}这会加载event我期望的数据。当我尝试修改此代码以使用以下代码选择多条记录时:typeEventResultsstruct{Events[]data.EventData}...ref:=fbDB.NewRef("/Event")res:=Even

firebase - 在 Golang 中仅使用环境变量初始化 Firebase Admin SDK

我正在尝试initializetheFirebaseAdminSDK,在go中,仅使用环境变量(无法访问文件系统)。我有service-account-file.json文件,可以通过以下方式让它在本地工作:exportGOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-file.json"...myfile.go:app,err:=firebase.NewApp(context.Background(),nil)但是,我想将service-account-file.json的内容放入环境变量中,并使用其值初始化fireba

firebase - 在谷歌云功能中找不到包 "firebase.google.com/go"

我正在尝试运行一些示例代码,这些代码使用Firestore服务器中的云函数存储一些随机数据,但是,云函数部署命令拒绝构建命令://PackagepcontainsanHTTPCloudFunction.packagepimport(//...firebase"firebase.google.com/go""log""net/http""os")//Store1StoresdataonFireBasefuncStore1(whttp.ResponseWriter,r*http.Request){//Usetheapplicationdefaultcredentialsctx:=conte